<template>
  <div>
    <TodoForm></TodoForm>
    <ListItems></ListItems>
    <ul>
      <li v-for="i in pages" :key="i">{{i}}</li>
    </ul>
    <hr/> num:{{$store.state.Cart.num}}
    <button @click="$store.commit('Cart/ADDNUM')">update</button>

  </div>

</template>

<script>
import TodoForm from "../components/TodoForm.vue"
import ListItems from "../components/ListItems"
import { mapGetters } from "vuex"
export default {
  components: {
    TodoForm,
    ListItems
  },
  computed: {
    ...mapGetters(["pages"])
  },
  created() {
    this.$store.dispatch("getlist")
  },
  mounted() {
    console.log("todolist mounted...")
  }
}
</script>






